/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.quality4spl.fm.cvm.util;

import java.util.Map;

import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.ResourceLocator;

import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.util.EObjectValidator;

import org.quality4spl.fm.cvm.*;

/**
 * <!-- begin-user-doc -->
 * The <b>Validator</b> for the model.
 * <!-- end-user-doc -->
 * @see org.quality4spl.fm.cvm.CvmPackage
 * @generated
 */
public class CvmValidator extends EObjectValidator {
	/**
	 * The cached model package
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final CvmValidator INSTANCE = new CvmValidator();

	/**
	 * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see org.eclipse.emf.common.util.Diagnostic#getSource()
	 * @see org.eclipse.emf.common.util.Diagnostic#getCode()
	 * @generated
	 */
	public static final String DIAGNOSTIC_SOURCE = "org.quality4spl.fm.cvm";

	/**
	 * A constant with a fixed name that can be used as the base value for additional hand written constants.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0;

	/**
	 * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;

	/**
	 * Creates an instance of the switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CvmValidator() {
		super();
	}

	/**
	 * Returns the package of this validator switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EPackage getEPackage() {
	  return CvmPackage.eINSTANCE;
	}

	/**
	 * Calls <code>validateXXX</code> for the corresponding classifier of the model.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) {
		switch (classifierID) {
			case CvmPackage.CVM_ELEMENT:
				return validateCVMElement((CVMElement)value, diagnostics, context);
			case CvmPackage.VARIABILITY_MODEL_ELEMENT:
				return validateVariabilityModelElement((VariabilityModelElement)value, diagnostics, context);
			case CvmPackage.VARIABILITY_MODEL:
				return validateVariabilityModel((VariabilityModel)value, diagnostics, context);
			case CvmPackage.VARIABILITY_MODEL_ENTRY:
				return validateVariabilityModelEntry((VariabilityModelEntry)value, diagnostics, context);
			case CvmPackage.VARIABILITY_MODEL_FOLDER:
				return validateVariabilityModelFolder((VariabilityModelFolder)value, diagnostics, context);
			case CvmPackage.FEATURE_DIAGRAM:
				return validateFeatureDiagram((FeatureDiagram)value, diagnostics, context);
			case CvmPackage.FEATURE_MODEL_ELEMENT:
				return validateFeatureModelElement((FeatureModelElement)value, diagnostics, context);
			case CvmPackage.FEATURE_MODEL:
				return validateFeatureModel((FeatureModel)value, diagnostics, context);
			case CvmPackage.FEATURE:
				return validateFeature((Feature)value, diagnostics, context);
			case CvmPackage.FEATURE_TREE_NODE:
				return validateFeatureTreeNode((FeatureTreeNode)value, diagnostics, context);
			case CvmPackage.CARDINALITY:
				return validateCardinality((Cardinality)value, diagnostics, context);
			case CvmPackage.INTERVAL:
				return validateInterval((Interval)value, diagnostics, context);
			case CvmPackage.FEATURE_GROUP:
				return validateFeatureGroup((FeatureGroup)value, diagnostics, context);
			case CvmPackage.FEATURE_LINK:
				return validateFeatureLink((FeatureLink)value, diagnostics, context);
			case CvmPackage.FEATURE_CONSTRAINT:
				return validateFeatureConstraint((FeatureConstraint)value, diagnostics, context);
			case CvmPackage.DEVIATION_ATTRIBUTE_SET:
				return validateDeviationAttributeSet((DeviationAttributeSet)value, diagnostics, context);
			case CvmPackage.CONFIG_DECISION_MODEL:
				return validateConfigDecisionModel((ConfigDecisionModel)value, diagnostics, context);
			case CvmPackage.CONFIG_DECISION_MODEL_ENTRY:
				return validateConfigDecisionModelEntry((ConfigDecisionModelEntry)value, diagnostics, context);
			case CvmPackage.CONFIG_DECISION:
				return validateConfigDecision((ConfigDecision)value, diagnostics, context);
			case CvmPackage.CONFIG_DECISION_FOLDER:
				return validateConfigDecisionFolder((ConfigDecisionFolder)value, diagnostics, context);
			case CvmPackage.CONFIG_DECISION_MODEL_ELEMENT:
				return validateConfigDecisionModelElement((ConfigDecisionModelElement)value, diagnostics, context);
			case CvmPackage.FEATURE_CONFIGURATION:
				return validateFeatureConfiguration((FeatureConfiguration)value, diagnostics, context);
			case CvmPackage.USER_ATTRIBUTE_TYPE:
				return validateUserAttributeType((UserAttributeType)value, diagnostics, context);
			case CvmPackage.USER_ATTRIBUTE_VALUE:
				return validateUserAttributeValue((UserAttributeValue)value, diagnostics, context);
			case CvmPackage.STRING_CONSTRAINING_TYPE:
				return validateStringConstrainingType((StringConstrainingType)value, diagnostics, context);
			case CvmPackage.FEATURE_MODEL_PROTOTYPE:
				return validateFeatureModelPrototype((FeatureModelPrototype)value, diagnostics, context);
			case CvmPackage.VARIABLE_ENTITY:
				return validateVariableEntity((VariableEntity)value, diagnostics, context);
			case CvmPackage.VARIABLE_PROPERTY:
				return validateVariableProperty((VariableProperty)value, diagnostics, context);
			case CvmPackage.VARIABLE_ENTITY_PART:
				return validateVariableEntityPart((VariableEntityPart)value, diagnostics, context);
			case CvmPackage.ENTITY_CONFIGURATION:
				return validateEntityConfiguration((EntityConfiguration)value, diagnostics, context);
			case CvmPackage.CDM_APPLICATION:
				return validateCDMApplication((CDMApplication)value, diagnostics, context);
			case CvmPackage.NAMED_ELEMENT:
				return validateNamedElement((NamedElement)value, diagnostics, context);
			case CvmPackage.USER_ATTRIBUTE_TYPE_CONTEXT:
				return validateUserAttributeTypeContext((UserAttributeTypeContext)value, diagnostics, context);
			case CvmPackage.VARIABILITY_DIAGRAM:
				return validateVariabilityDiagram((VariabilityDiagram)value, diagnostics, context);
			case CvmPackage.NAME_SEQUENCE:
				return validateNameSequence((NameSequence)value, diagnostics, context);
			case CvmPackage.COMPLIANCE_LEVEL:
				return validateComplianceLevel((ComplianceLevel)value, diagnostics, context);
			case CvmPackage.DEVIATION_PERMISSION:
				return validateDeviationPermission((DeviationPermission)value, diagnostics, context);
			case CvmPackage.PRIMITIVE_TYPE:
				return validatePrimitiveType((PrimitiveType)value, diagnostics, context);
			case CvmPackage.VISIBILITY:
				return validateVisibility((Visibility)value, diagnostics, context);
			default:
				return true;
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateCVMElement(CVMElement cvmElement, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(cvmElement, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateVariabilityModelElement(VariabilityModelElement variabilityModelElement, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(variabilityModelElement, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateVariabilityModel(VariabilityModel variabilityModel, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(variabilityModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(variabilityModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(variabilityModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(variabilityModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(variabilityModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(variabilityModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(variabilityModel, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(variabilityModel, diagnostics, context);
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateVariabilityModelEntry(VariabilityModelEntry variabilityModelEntry, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(variabilityModelEntry, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(variabilityModelEntry, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(variabilityModelEntry, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(variabilityModelEntry, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(variabilityModelEntry, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(variabilityModelEntry, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(variabilityModelEntry, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(variabilityModelEntry, diagnostics, context);
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateVariabilityModelFolder(VariabilityModelFolder variabilityModelFolder, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(variabilityModelFolder, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(variabilityModelFolder, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(variabilityModelFolder, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(variabilityModelFolder, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(variabilityModelFolder, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(variabilityModelFolder, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(variabilityModelFolder, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(variabilityModelFolder, diagnostics, context);
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateFeatureDiagram(FeatureDiagram featureDiagram, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(featureDiagram, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(featureDiagram, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(featureDiagram, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(featureDiagram, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(featureDiagram, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(featureDiagram, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(featureDiagram, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(featureDiagram, diagnostics, context);
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateFeatureModelElement(FeatureModelElement featureModelElement, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(featureModelElement, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateFeatureModel(FeatureModel featureModel, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(featureModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(featureModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(featureModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(featureModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(featureModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(featureModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(featureModel, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(featureModel, diagnostics, context);
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateFeature(Feature feature, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(feature, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(feature, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(feature, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(feature, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(feature, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(feature, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(feature, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(feature, diagnostics, context);
		if (result || diagnostics != null) result &= validateFeature_FeatureInheritance(feature, diagnostics, context);
		return result;
	}

	/**
	 * Validates the FeatureInheritance constraint of '<em>Feature</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateFeature_FeatureInheritance(Feature feature, DiagnosticChain diagnostics, Map<Object, Object> context) {
		// TODO implement the constraint
		// -> specify the condition that violates the constraint
		// -> verify the diagnostic details, including severity, code, and message
		// Ensure that you remove @generated or mark it @generated NOT
		if (false) {
			if (diagnostics != null) {
				diagnostics.add
					(createDiagnostic
						(Diagnostic.ERROR,
						 DIAGNOSTIC_SOURCE,
						 0,
						 "_UI_GenericConstraint_diagnostic",
						 new Object[] { "FeatureInheritance", getObjectLabel(feature, context) },
						 new Object[] { feature },
						 context));
			}
			return false;
		}
		return true;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateFeatureTreeNode(FeatureTreeNode featureTreeNode, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(featureTreeNode, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateCardinality(Cardinality cardinality, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(cardinality, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateInterval(Interval interval, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(interval, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateFeatureGroup(FeatureGroup featureGroup, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(featureGroup, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateFeatureLink(FeatureLink featureLink, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(featureLink, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(featureLink, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(featureLink, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(featureLink, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(featureLink, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(featureLink, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(featureLink, diagnostics, context);
		if (result || diagnostics != null) result &= validateFeatureLink_CorrectDirection(featureLink, diagnostics, context);
		return result;
	}

	/**
	 * Validates the CorrectDirection constraint of '<em>Feature Link</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateFeatureLink_CorrectDirection(FeatureLink featureLink, DiagnosticChain diagnostics, Map<Object, Object> context) {
		// TODO implement the constraint
		// -> specify the condition that violates the constraint
		// -> verify the diagnostic details, including severity, code, and message
		// Ensure that you remove @generated or mark it @generated NOT
		if (false) {
			if (diagnostics != null) {
				diagnostics.add
					(createDiagnostic
						(Diagnostic.ERROR,
						 DIAGNOSTIC_SOURCE,
						 0,
						 "_UI_GenericConstraint_diagnostic",
						 new Object[] { "CorrectDirection", getObjectLabel(featureLink, context) },
						 new Object[] { featureLink },
						 context));
			}
			return false;
		}
		return true;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateFeatureConstraint(FeatureConstraint featureConstraint, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(featureConstraint, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(featureConstraint, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(featureConstraint, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(featureConstraint, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(featureConstraint, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(featureConstraint, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(featureConstraint, diagnostics, context);
		if (result || diagnostics != null) result &= validateFeatureConstraint_LegalConstraint(featureConstraint, diagnostics, context);
		return result;
	}

	/**
	 * Validates the LegalConstraint constraint of '<em>Feature Constraint</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateFeatureConstraint_LegalConstraint(FeatureConstraint featureConstraint, DiagnosticChain diagnostics, Map<Object, Object> context) {
		// TODO implement the constraint
		// -> specify the condition that violates the constraint
		// -> verify the diagnostic details, including severity, code, and message
		// Ensure that you remove @generated or mark it @generated NOT
		if (false) {
			if (diagnostics != null) {
				diagnostics.add
					(createDiagnostic
						(Diagnostic.ERROR,
						 DIAGNOSTIC_SOURCE,
						 0,
						 "_UI_GenericConstraint_diagnostic",
						 new Object[] { "LegalConstraint", getObjectLabel(featureConstraint, context) },
						 new Object[] { featureConstraint },
						 context));
			}
			return false;
		}
		return true;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateDeviationAttributeSet(DeviationAttributeSet deviationAttributeSet, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(deviationAttributeSet, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateConfigDecisionModel(ConfigDecisionModel configDecisionModel, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(configDecisionModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(configDecisionModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(configDecisionModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(configDecisionModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(configDecisionModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(configDecisionModel, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(configDecisionModel, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(configDecisionModel, diagnostics, context);
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateConfigDecisionModelEntry(ConfigDecisionModelEntry configDecisionModelEntry, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(configDecisionModelEntry, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateConfigDecision(ConfigDecision configDecision, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(configDecision, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(configDecision, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(configDecision, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(configDecision, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(configDecision, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(configDecision, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(configDecision, diagnostics, context);
		if (result || diagnostics != null) result &= validateConfigDecision_LegalInclusionCriterion(configDecision, diagnostics, context);
		if (result || diagnostics != null) result &= validateConfigDecision_LegalInclExclFeatures(configDecision, diagnostics, context);
		return result;
	}

	/**
	 * Validates the LegalInclusionCriterion constraint of '<em>Config Decision</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateConfigDecision_LegalInclusionCriterion(ConfigDecision configDecision, DiagnosticChain diagnostics, Map<Object, Object> context) {
		// TODO implement the constraint
		// -> specify the condition that violates the constraint
		// -> verify the diagnostic details, including severity, code, and message
		// Ensure that you remove @generated or mark it @generated NOT
		if (false) {
			if (diagnostics != null) {
				diagnostics.add
					(createDiagnostic
						(Diagnostic.ERROR,
						 DIAGNOSTIC_SOURCE,
						 0,
						 "_UI_GenericConstraint_diagnostic",
						 new Object[] { "LegalInclusionCriterion", getObjectLabel(configDecision, context) },
						 new Object[] { configDecision },
						 context));
			}
			return false;
		}
		return true;
	}

	/**
	 * Validates the LegalInclExclFeatures constraint of '<em>Config Decision</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateConfigDecision_LegalInclExclFeatures(ConfigDecision configDecision, DiagnosticChain diagnostics, Map<Object, Object> context) {
		// TODO implement the constraint
		// -> specify the condition that violates the constraint
		// -> verify the diagnostic details, including severity, code, and message
		// Ensure that you remove @generated or mark it @generated NOT
		if (false) {
			if (diagnostics != null) {
				diagnostics.add
					(createDiagnostic
						(Diagnostic.ERROR,
						 DIAGNOSTIC_SOURCE,
						 0,
						 "_UI_GenericConstraint_diagnostic",
						 new Object[] { "LegalInclExclFeatures", getObjectLabel(configDecision, context) },
						 new Object[] { configDecision },
						 context));
			}
			return false;
		}
		return true;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateConfigDecisionFolder(ConfigDecisionFolder configDecisionFolder, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(configDecisionFolder, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(configDecisionFolder, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(configDecisionFolder, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(configDecisionFolder, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(configDecisionFolder, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(configDecisionFolder, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(configDecisionFolder, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(configDecisionFolder, diagnostics, context);
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateConfigDecisionModelElement(ConfigDecisionModelElement configDecisionModelElement, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(configDecisionModelElement, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateFeatureConfiguration(FeatureConfiguration featureConfiguration, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(featureConfiguration, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(featureConfiguration, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(featureConfiguration, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(featureConfiguration, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(featureConfiguration, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(featureConfiguration, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(featureConfiguration, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(featureConfiguration, diagnostics, context);
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateUserAttributeType(UserAttributeType userAttributeType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(userAttributeType, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateUserAttributeValue(UserAttributeValue userAttributeValue, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(userAttributeValue, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateStringConstrainingType(StringConstrainingType stringConstrainingType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(stringConstrainingType, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateFeatureModelPrototype(FeatureModelPrototype featureModelPrototype, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(featureModelPrototype, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(featureModelPrototype, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(featureModelPrototype, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(featureModelPrototype, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(featureModelPrototype, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(featureModelPrototype, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(featureModelPrototype, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(featureModelPrototype, diagnostics, context);
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateVariableEntity(VariableEntity variableEntity, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(variableEntity, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(variableEntity, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(variableEntity, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(variableEntity, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(variableEntity, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(variableEntity, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(variableEntity, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(variableEntity, diagnostics, context);
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateVariableProperty(VariableProperty variableProperty, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(variableProperty, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(variableProperty, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(variableProperty, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(variableProperty, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(variableProperty, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(variableProperty, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(variableProperty, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(variableProperty, diagnostics, context);
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateVariableEntityPart(VariableEntityPart variableEntityPart, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(variableEntityPart, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(variableEntityPart, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(variableEntityPart, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(variableEntityPart, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(variableEntityPart, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(variableEntityPart, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(variableEntityPart, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(variableEntityPart, diagnostics, context);
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateEntityConfiguration(EntityConfiguration entityConfiguration, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(entityConfiguration, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(entityConfiguration, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(entityConfiguration, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(entityConfiguration, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(entityConfiguration, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(entityConfiguration, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(entityConfiguration, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(entityConfiguration, diagnostics, context);
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateCDMApplication(CDMApplication cdmApplication, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(cdmApplication, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateNamedElement(NamedElement namedElement, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(namedElement, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(namedElement, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(namedElement, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(namedElement, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(namedElement, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(namedElement, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(namedElement, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(namedElement, diagnostics, context);
		return result;
	}

	/**
	 * Validates the NamingConventions constraint of '<em>Named Element</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateNamedElement_NamingConventions(NamedElement namedElement, DiagnosticChain diagnostics, Map<Object, Object> context) {
		// TODO implement the constraint
		// -> specify the condition that violates the constraint
		// -> verify the diagnostic details, including severity, code, and message
		// Ensure that you remove @generated or mark it @generated NOT
		if (false) {
			if (diagnostics != null) {
				diagnostics.add
					(createDiagnostic
						(Diagnostic.ERROR,
						 DIAGNOSTIC_SOURCE,
						 0,
						 "_UI_GenericConstraint_diagnostic",
						 new Object[] { "NamingConventions", getObjectLabel(namedElement, context) },
						 new Object[] { namedElement },
						 context));
			}
			return false;
		}
		return true;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateUserAttributeTypeContext(UserAttributeTypeContext userAttributeTypeContext, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(userAttributeTypeContext, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateVariabilityDiagram(VariabilityDiagram variabilityDiagram, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validate_EveryMultiplicityConforms(variabilityDiagram, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(variabilityDiagram, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(variabilityDiagram, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(variabilityDiagram, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(variabilityDiagram, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(variabilityDiagram, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(variabilityDiagram, diagnostics, context);
		if (result || diagnostics != null) result &= validateNamedElement_NamingConventions(variabilityDiagram, diagnostics, context);
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateNameSequence(NameSequence nameSequence, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(nameSequence, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateComplianceLevel(ComplianceLevel complianceLevel, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateDeviationPermission(DeviationPermission deviationPermission, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validatePrimitiveType(PrimitiveType primitiveType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateVisibility(Visibility visibility, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}

	/**
	 * Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public ResourceLocator getResourceLocator() {
		// TODO
		// Specialize this to return a resource locator for messages specific to this validator.
		// Ensure that you remove @generated or mark it @generated NOT
		return super.getResourceLocator();
	}

} //CvmValidator
